﻿using Glorysoft.EAP.EAPClient.ViewModel;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Glorysoft.EAP.EAPClient
{
    /// <summary>
    /// AdminLogin.xaml 的交互逻辑
    /// </summary>
    public partial class UserLogin : Window
    {
        public UserLogin()
        {
            InitializeComponent();
            this.DataContext = new UserLoginViewModel();    
            WindowStartupLocation = WindowStartupLocation.CenterOwner;
            this.Topmost= true ;
            Rect rc = SystemParameters.WorkArea;//获取工作区大小 
            this.Left = (rc.Width) * 4 / 6;//设置位置 
            this.Top = (rc.Height)/3;
            UserLoginViewModel.userloginpassword=string.Empty;
        }
        private void CloseWindowButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
        private void Image_MouseLeave(object sender, MouseEventArgs e)
        {
            this.txtPassWord.Visibility = Visibility.Collapsed;
        }

        private void Image_MouseMove(object sender, MouseEventArgs e)
        {
            this.txtPassWord.Visibility = Visibility.Visible;
            this.txtPassWord.Text = UserLoginViewModel.userloginpassword;
        }

        private void FButton_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
